<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><!--JBuilder QuickDoc-->
<HEAD>
<TITLE>Class OWIAgent</TITLE><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
</HEAD>
<BODY>

<H2>
<FONT SIZE="-1"></FONT>
<BR>Class OWIAgent</H2>
<DL>
<DT>public class <B>OWIAgent</B>
</DL>
<DL><DD><p>Title: </p> <p>Description: </p> <p>Copyright: Copyright (c) 2005</p> <p>@author David So</p><DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Version:</B><DD>1.0</DD>
</DL>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF"><TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B>
</FONT></TD></TR></TABLE>

<A NAME="queryGSV()"></A>

<H3>queryGSV</H3>
<PRE>
public void <B>queryGSV</B>()</PRE>
<DL><DD>Send Query for NMEA GSV Sentence<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>

<A NAME="set(java.lang.String, java.lang.String)"></A>

<H3>set</H3>
<PRE>
public boolean <B>set</B>(java.lang.String&nbsp;msgId,
                   java.lang.String&nbsp;msg)</PRE>
<DL><DD>Sends given OWI SET message then checks and compares sensor for correct ACK reply<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - String</DD>
<DD><CODE>msgId</CODE> - String</DD>
<DT><B>Returns:</B><DD>boolean</DD>
</DL>
<HR>

<A NAME="checkACK(java.lang.String, java.lang.String)"></A>

<H3>checkACK</H3>
<PRE>
private boolean <B>checkACK</B>(java.lang.String&nbsp;id,
                         java.lang.String&nbsp;ack)</PRE>
<DL><DD>Checks if ACK reply is valid<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - String</DD>
<DD><CODE>ack</CODE> - String</DD>
<DT><B>Returns:</B><DD>boolean</DD>
</DL>
<HR>

<A NAME="readLine()"></A>

<H3>readLine</H3>
<PRE>
private java.lang.String <B>readLine</B>()</PRE>
<DL><DD>Reads and returns the next sentence from serial port<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>String</DD>
</DL>
<HR>

<A NAME="sendMessage(java.lang.String)"></A>

<H3>sendMessage</H3>
<PRE>
private void <B>sendMessage</B>(java.lang.String&nbsp;raw)</PRE>
<DL><DD>Sends input string to output serial port<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>raw</CODE> - String</DD>
</DL>
<HR>

<A NAME="checksum(java.lang.String)"></A>

<H3>checksum</H3>
<PRE>
private static java.lang.String <B>checksum</B>(java.lang.String&nbsp;msg)</PRE>
<DL><DD>Returns the XOR checksum of input sentence. Input sentence must start with $ and end with *<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - String</DD>
<DT><B>Returns:</B><DD>String</DD>
</DL>
<HR>

</BODY>
</HTML>